home *** CD-ROM | disk | FTP | other *** search
- // Design Time Java Text Box implementation. (HPP)
-
- #ifndef _DTJCOMP_HPP
- #define _DTJCOMP_HPP
-
- #include "dtjobjct.hpp"
-
- struct MMJCodeGenerationParms;
- struct DTSelectedEventData;
- class DTJContainer;
-
- class METAEXPORTCLASSDEF DTJComponent : public DTJObject
- {
- public:
- DTJComponent( const MetaObject * pMetaObj );
- virtual ~DTJComponent();
-
- //
- // Create
- //
- // Call Create on the windowed object.
- //
- virtual WBool Create( WWindow * parent, const WRect & r,
- const WChar * text, WStyle style,
- WStyle exStyle, void * data = NULL,
- WBool isLoading = FALSE );
-
- virtual void RemoveFromContainer();
-
- virtual void AddToContainer();
-
- virtual void ContainerLayoutManagerChanged( DTJContainer * );
-
- virtual void DTBringToTop();
-
- //
- // DefaultStyle
- //
- // The style with which new instances are created. Default
- // implementation returns GetWindow()->GetDefaultStyle().
-
- virtual WStyle GetDefaultStyle() const;
-
- virtual void GenerateCode( MMCodeGeneration mmCodeGen,
- ostream& src,
- MMCodeGenerationParms& pGenParms );
-
- virtual const MetaObject * GetRefCardMeta() const;
-
- virtual WBool AllowEvent( const MMEvent * ) const;
-
- virtual void PropertyChanged( const WString & name );
-
- virtual WBool GetIsResizeable();
- virtual WBool GetIsMoveable();
-
- virtual void DTSetName( const WString & name );
-
- WBool GetBoundControl() const;
- void SetBoundControl( WBool bound );
-
- WBool GetBackgroundIsDefault() const;
- void SetBackgroundIsDefault( WBool isDefault );
-
- WBool GetForegroundIsDefault() const;
- void SetForegroundIsDefault( WBool isDefault );
-
- WBool GetFontIsDefault() const;
- void SetFontIsDefault( WBool isDefault );
-
- static PropertyInspectObject * MakePropEditor_BoundControl(
- const MMProperty * prop, PropertyInspector * prt,
- WUInt numObject, DTObject ** objects );
-
- static PropertyInspectObject * MakePropEditor_FDX(
- const MMProperty * prop, PropertyInspector * prt,
- WUInt numObject, DTObject ** objects );
-
- protected:
- virtual void GenerateCreate( const WString& objPrefix,
- ostream& src,
- MMJCodeGenerationParms* pGenParms ) const;
- virtual void GenerateImports( ostream& src,
- MMJCodeGenerationParms* pGenParms ) const;
- virtual void GenerateDatabaseProps( const WString& objPrefix,
- ostream& src,
- MMJCodeGenerationParms* pGenParms ) const;
- virtual void GenerateFontProp( const WString& objPrefix,
- ostream& src,
- MMJCodeGenerationParms* pGenParms ) const;
- virtual void GenerateColourProp( const WString& objPrefix,
- ostream& src,
- MMJCodeGenerationParms* pGenParms ) const;
- virtual void GenerateFDXDeclaration( ostream & src,
- MMJCodeGenerationParms * pGenParms ) const;
- virtual void GenerateFDXRead( ostream & src,
- MMJCodeGenerationParms * pGenParms ) const;
- virtual void GenerateFDXWrite( ostream & src,
- MMJCodeGenerationParms * pGenParms ) const;
-
- private:
- WBool handleSelected( WObject *, DTSelectedEventData* );
-
- private:
- WBool _boundControl;
- WBool _backgroundIsDefault;
- WBool _foregroundIsDefault;
- WBool _fontIsDefault;
- };
-
- // needed for mdreader
- typedef DTJComponent DTjava__dot__awt__dot__Component__dot__102;
- typedef WObject java__dot__awt__dot__Component__dot__102;
-
- #endif // _DTJCOMP_HPP
-